package project;

import com.alibaba.fastjson.JSONObject;

import java.util.HashMap;
import java.util.Map;

/**
 * @author fangkun
 * @create 2022-12-07-11:54
 */
public class JsonDemo {
    public static void main(String[] args) {

        HashMap<String,String> params = new HashMap<>();
        String json = "{\"DeviceUUID\":\"PC@AB49A000-8A95-11E9-BB15-F425F2592900\",\"AdapterNBID\":\"0A002700000B\",\"ComputerName\":\"DESKTOP-PIQO2G7(v5.1.1502.2646)\"}";

        JSONObject jsonObject = JSONObject.parseObject(json);

        for (Map.Entry<String,Object> entry : jsonObject.entrySet()){
            params.put(entry.getKey(),jsonObject.getString(entry.getKey()));
        }

        System.out.println(params);
    }

}
